﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchCustom.ascx.cs"
    Inherits="Controls_Template_SearchCustom" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<script type="text/javascript" src="../../Scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
    function Search() {
        var value = document.getElementById('<%=tbKeySearch.ClientID %>').value;
        if (value == "" || value == null) {
            alert("Hãy điền từ khóa !!!");
        }
    }

    function Reset() {
        document.getElementById('<%=tbKeySearch.ClientID %>').value = "";
    }

    function ClearText() {
        document.getElementById('<%=tbKeySearch.ClientID %>').value = "";
    }
</script>
<%--<asp:Panel id="panel2" GroupText="Group1">
//Các control và element nằm trong ô
</asp:Panel>--%>
<div id="searchOption" runat="server" style="margin-left: 20px">
    <%--<fieldset>
        <legend>Tìm kiếm nâng cao</legend>
        Từ khóa:<asp:TextBox ID="keySearch" runat="server"></asp:TextBox>
    </fieldset>--%>
    <asp:Panel ID="panel1" runat="server" Width="100%" BackColor="#C0C0C0">
        <div style="background-color: #FFFFFF">
            <div style="background-color: #4B6C9E; font-weight: bolder; font-size: medium; text-align: center;"
                align="center">
                <asp:Label ID="Label6" Style="color: White" runat="server">Tìm kiếm nâng cao</asp:Label>
            </div>
            <div id="divSearchOption">
                <fieldset>
                    <%--<legend>Tùy chọn tìm kiếm</legend>
                    <table>
                        <tr>
                            <th style="width:40%">
                                Từ khóa: <asp:TextBox ID="keySearch" runat="server"></asp:TextBox>
                            </th>
                            <th style="width: 60%">
                                <asp:ListBox ID="ListBox1" runat="server"></asp:ListBox>
                            </th>
                        </tr>
                    </table>--%>
                    <table>
                        <tr>
                            <th style="width: 20%">
                                <fieldset>
                                    <legend>Từ khóa tìm kiếm</legend>
                                    <asp:TextBox ID="tbKeySearch" runat="server"></asp:TextBox><br />
                                    <br />
                                    <asp:Button ID="btnClear" Text="Clear" class="button" runat="server" OnClientClick="ClearText()" />
                                </fieldset>
                            </th>
                            <th style="width: 80%">
                                <fieldset>
                                    <legend>Phạm vi tìm kiếm</legend>
                                    <asp:ListBox ID="listBoxPhamVi" runat="server" Height="100px" Width="100%"></asp:ListBox>
                                </fieldset>
                            </th>
                        </tr>
                    </table>
                </fieldset>
            </div>
        </div>
    </asp:Panel>
    <div id="divButton" style="margin-top: 10px; text-align: center">
        <asp:Button ID="btnSearch" runat="server" class="button" Text="Tìm kiếm" OnClientClick="Search()"
            OnClick="btnSearch_Click" />
        <%--<asp:Button ID="btnReset" runat="server" class="button" Text="Reset" OnClientClick="Reset()" />--%>
    </div>
</div>
<br />
<br />
<div id="searchResult" runat="server" style="display: none; margin-left: 20px">
    <asp:Panel ID="panel2" runat="server" Width="100%" BackColor="#C0C0C0">
        <%--<div style="background-color: #4B6C9E; font-weight: bolder; font-size: medium">
                <asp:Label ID="lbKeySearch" Style="color: White" runat="server"></asp:Label>
                <asp:Label ID="lbMauVirus" Style="color: White" runat="server"></asp:Label>
                <asp:Label ID="lbMuc" Style="color: White" runat="server"></asp:Label> 
        </div>--%>
        <div style="background-color: #4B6C9E; font-weight: bolder; font-size: medium; text-align: center;"
            align="center">
            <asp:Label ID="lblTitleCustomSearch" Style="color: White" runat="server"></asp:Label>
        </div>
    </asp:Panel>
    <asp:Repeater ID="rptResultSearch" runat="server">
        <ItemTemplate>
            <br />
            <br />
            <asp:Label ID="lbTenVirus" runat="server" Style="color: Red; font-weight: bold" Text='<%# Eval("name")%>'></asp:Label>
            <asp:Button ID="btnEdit" runat="server" Text="Sửa" class="button" Style="display: none"
                CommandArgument='<%# Eval("id")%>' />
            <asp:Button ID="btnDelete" runat="server" Text="Xóa" class="button" Style="display: none"
                CommandArgument='<%# Eval("id")%>' /><br />
            <br />
            <table id="tbResult" width="100%" border="1" style="border-collapse: collapse">
                <thead>
                    <tr style="background-color: #507CD1; color: #169; font-weight: bold; text-align: center">
                        <td style="display: none">
                        </td>
                        <td style="color: White">
                            Tên Mẫu
                        </td>
                        <td style="color: White">
                            Loại Mẫu
                        </td>
                        <td style="color: White">
                            Tên Hàm Diệt
                        </td>
                        <td style="color: White">
                            Người Phân Tích
                        </td>
                        <td style="color: White">
                            Ngày Tháng
                        </td>
                        <td style="color: White">
                            Sự Vụ
                        </td>
                        <td style="color: White">
                            Loại Malware
                        </td>
                        <td style="color: White">
                            Hành Vi
                        </td>
                        <td style="color: White">
                            Kĩ Thuật Anti
                        </td>
                        <td style="color: White">
                            Domain Server Connect
                        </td>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td style="display: none" id="tdID" runat="server">
                            <%# Eval("id")%>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("name") %>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("LoaiMau") %>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("tenhamdiet") %>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("NguoiPhanTich") %>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("date") %>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("suvu") %>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("LoaiMalware") %>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("HanhVi") %>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("KiThuatAnti") %>
                        </td>
                        <td style="text-align: center">
                            <%#Eval("domainserverconnect") %>
                        </td>
                    </tr>
                </tbody>
            </table>
            <asp:HyperLink Target="_blank" ID="ThongTinChung" runat="server" Text="Thông Tin Chung"
                Style="display: none; margin-bottom: 30px"></asp:HyperLink>
            <asp:HyperLink Target="_blank" ID="ThongTinKyThuatChiTiet" runat="server" Text="Thông Tin Kỹ Thuật Chi Tiết"
                Style="display: none; margin-bottom: 30px"></asp:HyperLink>
            <asp:HyperLink Target="_blank" ID="ThongTinFile" runat="server" Text="Thông Tin File"
                Style="display: none; margin-bottom: 30px"></asp:HyperLink>
            <asp:HyperLink Target="_blank" ID="ThongTinHamDiet" runat="server" Text="Thông Tin Hàm Diệt"
                Style="display: none; margin-bottom: 30px"></asp:HyperLink>
        </ItemTemplate>
    </asp:Repeater>
</div>
